home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_gen_slashweb_talk.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
91 lines
# Jones 3D Cog Script
#
# gen_Slashweb_talk.cog
#
# Damage a face with Machete to allow move through.
# Added Indy sayline for bumping into .[SXC & DS]
# Removed flying leaves previously added to slashvine_talk.
#
# [TRM & SXC & DS]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message damaged
message touched
sound touchvines
surface vines mask=0x408
surface vinesback mask=0x408
thing player local
int tutch=0 local
int direction=0 local
int facedir=0 desc=0-north, 1-south, 2-east, 3-west
flex playerx=0 local
flex playery=0 local
vector playervec local
end
# ========================================================================================
code
damaged:
# See if damage is from machete -- RT
if (GetParam(1) == 0x20)
{
SetWallCel(vines, 1);
SetWallCel(vinesback, 1);
ClearAdjoinFlags(vines, 0x10);
SetAdjoinFlags(vinesback, 0x2);
tutch = 1;
}
return;
# ========================================================================================
touched:
if (tutch == 1) return;
player = GetLocalPlayerThing();
playervec = GetThingLVec(player);
playery = VectorY(playervec);
playerx = VectorX(playervec);
if ((playery > 0) && ((playerx > -0.7) && (playerx < 0.7)))
{
direction = 0; # North
}
else if ((playery < 0) && ((playerx > -0.7) && (playerx < 0.7)))
{
direction = 1; # South
}
else if ((playerx > 0) && ((playery > -0.7) && (playery < 0.7)))
{
direction = 2; # East
}
else if ((playerx < 0) && ((playery > -0.7) && (playery < 0.7)))
{
direction = 3; # West
}
if (direction == facedir)
{
PlayVoice(player, touchvines, 1.0, 0);
tutch = 1;
}
return;
end